import {useState} from "react";
import {View} from "@tarojs/components";
import Item from './item'

export default function Nr() {
  const [list] = useState([
    {
      title: '语文',
      list: [
        {
          year: 2024,
          month: 4,
          errorTypeList: [
            {
              name: '错误的',
              num: 5
            }
          ]
        }
      ]
    },
    {
      title: '数学',
      list: [
        {
          year: 2024,
          month: 4,
          errorTypeList: [
            {
              name: '计算错误',
              num: 5
            },
            {
              name: '粗心',
              num: 5
            },
            {
              name: '正确的',
              num: 5
            },
            {
              name: '审题不认真',
              num: 5
            },
            {
              name: '不会做',
              num: 5
            },
            {
              name: '速算太慢',
              num: 5
            },
            {
              name: '马虎',
              num: 5
            }
          ]
        },
        {
          year: 2024,
          month: 5,
          errorTypeList: [
            {
              name: '计算错误',
              num: 5
            },
            {
              name: '粗心',
              num: 5
            },
            {
              name: '正确的',
              num: 5
            },
            {
              name: '审题不认真',
              num: 5
            },
            {
              name: '不会做',
              num: 5
            },
            {
              name: '速算太慢',
              num: 5
            },
            {
              name: '马虎',
              num: 5
            }
          ]
        }
      ]
    }
  ])
  return (
    <View className='nrbox'>
      {
        list.map((item, index) => {
          return  <Item key={index} item={item} />
        })
      }
    </View>
  )
}
